home *** CD-ROM | disk | FTP | other *** search
Wrap
/*********************************/ /* Image Engineer Macro script */ /* by Simon Edwards */ /* 3/4/95 */ /* */ /* This lets you select an alpha */ /* channel image to be scaled to */ /* the same as the project. */ /*********************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit project_info arg(1) WIDTH width=RESULT project_info arg(1) HEIGHT height=RESULT 'REQUEST "Image to use for alpha channel" "Spherical|Spherical2|Gradient|Highlight|Highlight2"' reply=RESULT select when reply=1 then alphaname='IE:alpha/Spherical.alpha' when reply=2 then alphaname='IE:alpha/Spherical2.alpha' when reply=3 then alphaname='IE:alpha/Gradient.alpha' when reply=4 then alphaname='IE:alpha/highlight.alpha' when reply=0 then alphaname='IE:alpha/highlight2.alpha' end TYPE 8BIT 'OPEN "'||alphaname||'"' alphachannel=result SCALE alphachannel width height BEST newalpha=result CLOSE alphachannel MARK arg(1) PRIMARY MARK newalpha ALPHA exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end